<%@ page import="appli1.web.*, appli1.ejb.*, java.math.*, javax.naming.*"%> 

<html>
    <head>
        <title>Command Page</title>
    </head>

    <body bgcolor="white">
        <h1>Command line Client</h1>
        <hr>
        <p>Author: Prawee :-) </p>
        <p>
        	Commands
        <p>
        	create [object name] [object value]	<br>
        	read [object name]	<br>
        	readAll <br>
        	modif [object name] [object value]	<br>
        	delete [object name] <br>
        	clear <br>
        
        <p>Please enter the command:</p>
        <form method="get">
            <input type="text" name="input1" size="50">
            <br>
            <p>
            <input type="submit" value="Submit">
            <input type="reset" value="Reset">
        </form>

		<p>
        <%
            String input1 = request.getParameter("input1");
            if ( input1 != null && input1.length() > 0 ) {
                  CommandLine cl = (CommandLine) Helper.getBean(session, CommandLine.class);
				  cl.execute(input1);
				  String output = cl.getScreen();
				  output = output.replaceAll("\n", "<br>");
				  out.print(output);
            }
        %>
        <p>

    </body>
</html>
